create table sys_role_dept
(
    role_id bigint not null,
    dept_id bigint not null,
    primary key (role_id, dept_id)
)
go

exec sp_addextendedproperty 'MS_Description', '角色和部门关联表', 'SCHEMA', 'dbo', 'TABLE', 'sys_role_dept'
go

exec sp_addextendedproperty 'MS_Description', '角色ID', 'SCHEMA', 'dbo', 'TABLE', 'sys_role_dept', 'COLUMN', 'role_id'
go

exec sp_addextendedproperty 'MS_Description', '部门ID', 'SCHEMA', 'dbo', 'TABLE', 'sys_role_dept', 'COLUMN', 'dept_id'
go

INSERT INTO [ry-vue].dbo.sys_role_dept (role_id, dept_id) VALUES (2, 100);
INSERT INTO [ry-vue].dbo.sys_role_dept (role_id, dept_id) VALUES (2, 101);
INSERT INTO [ry-vue].dbo.sys_role_dept (role_id, dept_id) VALUES (2, 105);